using System;
using System.Security.Cryptography;

namespace NET.Library.Security
{
	/// <summary>
	/// Summary description for Encryption.
	/// </summary>
	public class Encryption
	{
        //
        
        //
        /// <summary>
        /// HexToByte        
        /// </summary>
        /// <param name="hexString"></param>
        /// <returns></returns>
        /// <remarks>
        ///  Converts a hexadecimal string to a byte array. Used to convert encryption
        ///  key values from the configuration.
        ///</remarks>
        public static byte[] HexToByte(string hexString)
        {
            byte[] returnBytes = new byte[hexString.Length / 2];
            for (int i = 0; i < returnBytes.Length; i++)
                returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
            return returnBytes;
        }
	}

	
}
